From 630543a82225aa73c2fcba9631dfe3d37be78048 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 29 Oct 2012 17:55:57 +0800 Subject: [PATCH] Manage face-remapping-alist properly in face-remap-add-relative. * face-remap.el (face-remap-add-relative): Handle the case where a face-remapping-alist entry is a cons cell. --- lisp/ChangeLog | 5 +++++ lisp/face-remap.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5fef0ee2130..4aabcc75a57 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-10-29 Chong Yidong + + * face-remap.el (face-remap-add-relative): Handle the case where a + face-remapping-alist entry is a cons cell (Bug#12762). + 2012-10-29 Glenn Morris * emacs-lisp/cl.el (defsetf): Doc fix. diff --git a/lisp/face-remap.el b/lisp/face-remap.el index baf1eeb389d..903c12a787e 100644 --- a/lisp/face-remap.el +++ b/lisp/face-remap.el @@ -132,7 +132,10 @@ other than the normal definition of FACE via `face-remap-set-base'." (when (null entry) (setq entry (list face face)) ; explicitly merge with global def (push entry face-remapping-alist)) - (setcdr entry (face-remap-order (cons specs (cdr entry)))) + (let ((faces (cdr entry))) + (if (symbolp faces) + (setq faces (list faces))) + (setcdr entry (face-remap-order (cons specs faces)))) (cons face specs))) (defun face-remap-remove-relative (cookie) -- 2.30.2